
package codeGenerate.custom.tempalte;

import java.util.LinkedHashMap;
import java.util.Map;

import codeGenerate.custom.vo.CustomConfigVo;

/**
 * 历史框架模版，对应旧代码生成器1.0.3版本
 * TODO javadoc for codeGenerate.mybatis.tempalte.TemPathMybatis
 * @Copyright: 
 * @author: dw-fu1
 * @since: 2018年2月26日
 */
public class TemPathCustom extends TemPathCustomAbstract {

	/**
	 * 模版相对根路径
	 */
	private static final String RELATIVE_PATH_ROOT = "/custom";

	@Override
	public Map<String, String> getPathMap(CustomConfigVo configVo) {
		Map<String, String> fileMap = new LinkedHashMap<String, String>();
		//后台代码
		String srcPath = configVo.getGenPath() + "/src/" + configVo.getPack().replace(".", "/");
		fileMap.put(RELATIVE_PATH_ROOT + "/src/common/constants.ftl", srcPath + "/common/" + configVo.getBeanName() + "Constants.java");
		fileMap.put(RELATIVE_PATH_ROOT + "/src/entity/pojoQuery.ftl", srcPath + "/entity/" + configVo.getBeanName() + "Qo.java");
		fileMap.put(RELATIVE_PATH_ROOT + "/src/entity/pojoShow.ftl", srcPath + "/entity/" + configVo.getBeanName() + "Vo.java");
		fileMap.put(RELATIVE_PATH_ROOT + "/src/service/impl/serviceImpl.ftl", srcPath + "/service/impl/" + configVo.getBeanName() + "ServiceImpl.java");
		fileMap.put(RELATIVE_PATH_ROOT + "/src/service/service.ftl", srcPath + "/service/" + configVo.getBeanName() + "Service.java");
		fileMap.put(RELATIVE_PATH_ROOT + "/src/web/controller.ftl", srcPath + "/web/" + configVo.getBeanName() + "Controller.java");
		
		//后台管理代码
		fileMap.put(RELATIVE_PATH_ROOT+"/swagger/swagger.ftl", configVo.getGenPath() + "/" + configVo.getBeanName() + "Swagger.json");
		return fileMap;
	}

}
